﻿<%@ Page Language="C#" AutoEventWireup="true" Debug="true"  ValidateRequest="false" CodeFile="newsAdd.aspx.cs" Inherits="Manage_newsAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" type="text/css" href="css/admin.css" />
    

    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
    
    <script type="text/javascript" src="ueditor/editor_all.js"></script>

    <script type="text/javascript" src="ueditor/editor_all_min.js"></script>

    <script type="text/javascript" src="ueditor/editor_config.js"></script>

    <link rel="Stylesheet" type="text/css" href="ueditor/themes/default/ueditor.css" />
    <style type="text/css">
        .inputfoucs
        {
            font-size: 12px;
            padding: 3px;
            border: 1px solid #f7ca06;
            background: #fffbca;
            color: #cb6a24;
        }
        .inputblur
        {
            font-size: 12px;
            padding: 3px;
            background: #f8f9ff;
            border: 1px solid #c4c9fd;
            color: #6C63A3;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
            <tr height="28">
                <td background="images/title_bg1.jpg">
                    当前位置:
                    <asp:SiteMapPath ID="SiteMapPath1" runat="server" SiteMapProvider="ManageSiteMapProvider">
                    </asp:SiteMapPath>
                </td>
            </tr>
            <tr>
                <td bgcolor="#b1ceef" height="1">
                </td>
            </tr>
            <tr height="20">
                <td background="images/shadow_bg.jpg">
                </td>
            </tr>
        </table>
        
        <div style="margin-left:10px;margin-right:10px">
            <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                <tr height="1">
                    <td>
                    </td>
                </tr>
                <tr height="22">
                    <td style="padding-left: 20px; font-weight: bold; color: #ffffff" align="left" background="images/title_bg2.jpg">
                        编辑新闻
                    </td>
                </tr>
                <tr bgcolor="#ecf4fc" height="12">
                    <td>
                    </td>
                </tr>
                <tr height="5">
                    <td>
                    </td>
                </tr>
            </table>
            
            <div>
                <table>
                    <tr>
                        <td>新闻标题</td>
                        <td>
                            <asp:TextBox ID="txt_Title" runat="server" Width="300px"></asp:TextBox></td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txt_Title" SetFocusOnError="true" runat="server" ErrorMessage="请输入新闻标题"></asp:RequiredFieldValidator>
                    </tr>
                    <tr>
                        <td style="width:80px;">选择分类</td>
                        <td>
                            <asp:DropDownList ID="ddl_Category" runat="server" DataTextField="Name" 
                                DataValueField="Id">
                            </asp:DropDownList>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            
                        </td>
                    </tr>
                    
                    <tr>
                        <td>新闻内容</td>
                        <td>
                            <!--百度编辑器-->
                            <div id="editorValuedate" runat="server" style="display: none;">
                                <asp:TextBox ID="txt_Content" runat="server"></asp:TextBox>
                            </div>
                            <div name="editorValue" runat="server" id="editorValue" style="">
                            </div>

                            <script type="text/javascript">
                                var val = document.getElementById("txt_Content").value;
                                var editor = new baidu.editor.ui.Editor({
                                /*
                                toolbars: [['fullscreen', 'undo', 'redo', 'source', 'cleardoc', 'insertunorderedlist',
                                                    'insertorderedlist', 'unlink', 'link', 'selectall', 'searchreplace',
                                                    'preview', 'help', 'insertimage', 'attachment', 'emotion', 'insertvideo',
                                                    'date', 'time', 'horizontal', 'anchor', 'spechars', 'blockquote', 'highlightcode',
                                                    'bold', 'italic', 'underline', 'strikethrough', 'forecolor', 'backcolor', 'superscript',
                                                    'subscript', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify',
                                                    'indent', 'removeformat', 'formatmatch', 'pasteplain', 'customstyle', 'paragraph',
                                                    'rowspacingtop', 'rowspacingbottom', 'lineheight', 'fontfamily', 'fontsize',
                                                    'imagenone', 'imageleft', 'imageright', 'imagecenter', 'inserttable', 'deletetable',
                                                    'mergeright', 'mergedown', 'splittorows', 'splittocols', 'splittocells', 'mergecells',
                                                    'insertcol', 'insertrow', 'deletecol', 'deleterow', 'insertparagraphbeforetable',
                                                    ]],
                                                    */
                                    minFrameHeight: "400",
                                    autoHeightEnabled: false,
                                    initialContent: val

                                });
                                editor.render("editorValue");
                                editor.setContent($("#editorValuedata")[0].innerHTML);
                                document.getElementById('editorValuedata').innerHTML = "";
                        
                            </script>
                        </td>
                    </tr>
                    <tr style="height:80px;">
                        <td colspan="2" align="center">
                            <asp:Button ID="btn_Submit" Width="50" Height="25" runat="server" Text="提交" 
                                onclick="btn_Submit_Click" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
